package com.peanut.baby.model;

import com.google.gson.annotations.SerializedName;

/**
 * live room message
 * Created by anonymouslystudio on 2017/7/18.
 */

public class LiveMsg {
    private static final String TAG = LiveMsg.class.getSimpleName();
    public static final int TAB_LECTURE = 1;
    public static final int TAB_DISCUSS = 2;

    public static final int TYPE_TEXT   = 1;
    public static final int TYPE_IMAGE  = 2;
    public static final int TYPE_VOICE  = 3;

    @SerializedName("id")
    public int id;

    @SerializedName("roomId")
    public int roomId ;
    @SerializedName("nickname")
    public String   nickname;
    @SerializedName("avatar")
    public String   avatar;
    @SerializedName("type")
    public int      tabType;
    @SerializedName("messageType")
    public int      messageType;
    @SerializedName("message")
    public LiveMsgContent   message;
    @SerializedName("creatorId")
    public int   creatorId;
    @SerializedName("createTime")
    public long   createTime;

    public String localMessage;
    public LiveMsg(){

    }

    public LiveMsgContent getMessageContent(){
//        if(content == null){
//            content = new LiveMsgContent(message);
//
//        }
        return message;
    }

    @Override
    public String toString() {
        return "Message{" +
                "id='" + id + '\'' +
                ", roomId='" + roomId + '\'' +
                ", nickname='" + nickname + '\'' +
                ", avatar='" + avatar + '\'' +
                ", tabType=" + tabType +
                ", messageType=" + messageType +
                ", message='" + message + '\'' +
                ", creatorId='" + creatorId + '\'' +
                ", createTime='" + createTime + '\'' +
                '}';
    }
}
